/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.com.jlib.ev.persistence.dialect;

import java.sql.Connection;
import java.util.List;
import javax.persistence.Query;

/**
 *
 * @author afonso.rodrigues
 */
public interface BaseDao {

    public void beginTransaction() throws Exception;

    public void commit() throws Exception;

    public void rollback() throws Exception;

    public void close() throws Exception;

    public void flush() throws Exception;

    public void save(Object obj) throws Exception;

    public void update(Object obj) throws Exception;

    public List list(Object obj) throws Exception;

    public void delete(Object obj) throws Exception;

    public List list(Class<?> c) throws Exception;

    public void saveOrUpdate(Object obj) throws Exception;

    public Object findObject(Class<?> o, Long id) throws Exception;

    public Connection getConexao() throws Exception;

    public Query criaQuery(String hql);

    public Query criaQueryNativa(String sql);

    public List<?> executaQuery(Query query);
    
     public List<?> find(String hql) throws Exception;
}
